<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>订单列表</title>
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="../../css/reset.css">
<link rel="stylesheet" type="text/css" href="../../css/main.css">
<link rel="stylesheet" type="text/css"
	href="../../css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../../css/member.css">
</head>
<body>
	<!--//zmr>v30-->
	<header id="header"></header>
	<div class="order-list-wp" id="order-list"></div>
	<script type="text/html" id="order-list-tmpl">
        <div class="order-list">
            <%if (typeof rows !='undefined' && rows.length >0){%>
                <ul>
                    <%for(var i = 0;i<rows.length;i++){
                        var orderoaps = rows[i].oaps;
                    %>
                        <li class="<%if(rows[i].state==0){%>green-order-skin<%}else{%>gray-order-skin<%}%> <%if(i>0){%>mt10<%}%>">
                            <div class="order-ltlt">
                                <p>
                                    下单时间：
                                   <%=$getLocalTime(rows[i].createDate)%>
                                </p>
                            </div>
                            <div class="order-lcnt">
                                <div class="order-lcnt-shop">
                                    <p>订单编号：<%=rows[i].no%></p>
                                </div>
                                <div class="order-shop-pd">
                                    <%for (var k = 0;k<orderoaps.length;k++){
                                        var order_cpackage = orderoaps[k].cpackage;
                                        if (!order_cpackage.commodity) {order_cpackage.commodity={}};
                                    %>
                                    <a class="order-ldetail clearfix <%if(k>0){%>bd-t-de<%}%>" href="<%=WapSiteUrl%>/tmpl/product_detail.html?goods_id=<%=order_cpackage.commodity.id%>">
                                        <span class="order-pdpic">
                                            <img src="<%=order_cpackage.commodity.photo%>"/>
                                        </span>
                                        <div class="order-pdinfor">
                                            <p><%=order_cpackage.title%></p>
                                            <p>
                                                单价：<span class="clr-d94">￥<%=order_cpackage.money%></span>
                                                <% if(order_cpackage.advanceMoney) { %>
                                                订金：<span class="clr-d94">￥<%=order_cpackage.advanceMoney%></span>
                                                <% }%>
                                            </p>
                                            <p>
                                                商品数目：<%=orderoaps[k].num%>
                                            </p>
                                        </div>
                                    </a>
                                    <%}%>
                                </div>
                                <div class="order-shop-total">
                                    <p>运费：<span class="clr-d94">￥0</span></p>
                                    <p class="clr-c07">总价合计：￥<%=rows[i].price%> </p>
                                    <% if(rows[i].advanceMoney) { %>
                                    <p class="clr-c07">订金：￥<%=rows[i].advanceMoney%> </p>
                                    <%if(rows[i].state==1) {%>
                                    <p class="clr-c07">尾款：￥<%=rows[i].price - rows[i].advanceMoney%> </p>
                                    <% }%>
                                    <% }%>

                                </div>
                            </div>
                            <%if(rows[i].state==0) {%>

                            <% if(rows[i].advanceMoney) { %>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>"  class="l-btn-login check-payment payAlipay">支付宝支付订金（￥<%= p2f(rows[i].advanceMoney) %>）</a>
                            <p style="height:5px;"></p>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>"  class="l-btn-login check-payment payWeixin">微信支付订金（￥<%= p2f(rows[i].advanceMoney) %>）</a>
                            <p style="height:5px;"></p>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>" class="l-btn-login check-payment balance-pay">余额支付订金（￥<%= p2f(rows[i].advanceMoney) %>）</a>

                            <p style="height:5px;"></p>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>" class="l-btn-login check-payment del-order ">取消订单</a>


                            <% } else { %>

                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>"  class="l-btn-login check-payment payAlipay">支付宝支付（￥<%= p2f(rows[i].price) %>）</a>
                            <p style="height:5px;"></p>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>"  class="l-btn-login check-payment payWeixin">微信支付（￥<%= p2f(rows[i].price) %>）</a>
                            <p style="height:5px;"></p>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>" class="l-btn-login check-payment balance-pay">余额支付（￥<%= p2f(rows[i].price) %>）</a>

                            <p style="height:5px;"></p>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>" class="l-btn-login check-payment  del-order">取消订单</a>
                            <%}  %>

                            <% } else if (rows[i].state==101) { %>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>"  class="l-btn-login check-payment payAlipay">支付宝支付尾款（￥<%= p2f(rows[i].price) -p2f(rows[i].advanceMoney) %>）</a>
                            <p style="height:5px;"></p>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>"  class="l-btn-login check-payment payWeixin">微信支付尾款（￥<%= p2f(rows[i].price) -p2f(rows[i].advanceMoney) %>）</a>
                            <p style="height:5px;"></p>
                            <a href="javascript:void(0)" orderid="<%=rows[i].id%>" class="l-btn-login check-payment balance-pay">余额支付尾款（￥<%= p2f(rows[i].price) -p2f(rows[i].advanceMoney) %>）</a>
                            <%}  else if (rows[i].state==100) { %>
                            <div class="order-shop-total">
                            <p style="height:25px;align:center">方案定制中,请稍后查询</p>
                            </div>
                            <%}  %>


                        </li>
                    <%}%>
                </ul>
                <div class="pagination mt10">
                    <a href="javascript:void(0);" class="pre-page <%if(curpage <=1 ){%>disabled<%}%>">上一页</a>
                    <a href="javascript:void(0);" has_more="<%if (hasmore){%>true<%}else{%>false<%}%>"  class="next-page <%if (!hasmore){%>disabled<%}%>">下一页</a>
                </div>
            <%}else {%>
                <div class="no-record">
                    暂无记录
                </div>
            <%}%>
        </div>
    </script>
	<div id="footer"></div>
	<script type="text/javascript" src="../../js/zepto.min.js"></script>
	<script type="text/javascript" src="../../js/template.js"></script>
	<script type="text/javascript" src="../../js/config.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../../js/simple-plugin.js"></script>
	<!--<script type="text/javascript" src="../../js/tmpl/common-top.js"></script>-->
	<script type="text/javascript" src="../../js/tmpl/footer.js"></script>
	<script type="text/javascript" src="../../js/tmpl/order_list.js"></script>
</body>
</html>